package com.smartleanx.module.hrm.dal.mysql.examine.examineResultConfig;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineResultConfig.ExamineResultConfigDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineResultConfig.vo.*;

/**
 * 考核结果设置项	 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineResultConfigMapper extends BaseMapperX<ExamineResultConfigDO> {

    default PageResult<ExamineResultConfigDO> selectPage(ExamineResultConfigPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineResultConfigDO>()
                .likeIfPresent(ExamineResultConfigDO::getGradeName, reqVO.getGradeName())
                .eqIfPresent(ExamineResultConfigDO::getFractionStart, reqVO.getFractionStart())
                .eqIfPresent(ExamineResultConfigDO::getFractionEnd, reqVO.getFractionEnd())
                .eqIfPresent(ExamineResultConfigDO::getExamineId, reqVO.getExamineId())
                .orderByDesc(ExamineResultConfigDO::getId));
    }

}